package com.cn.wanxi.test;

import com.cn.wanxi.model.OnlineModel;
import com.cn.wanxi.service.OnlineService;
import com.cn.wanxi.service.impl.OnlineServiceImpl;
import org.junit.Test;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

public class Online {
    private static String aa="a";
    @Test
    public void add() {
//        OnlineModel onlineModel = new OnlineModel();
//        onlineModel.setName("name111");
//        onlineModel.setEmail("email11");
//        onlineModel.setContent("content11");
//        onlineModel.setPhone("phone11");
//        OnlineService onlineService = new OnlineServiceImpl();
//        String result = onlineService.add(onlineModel);
//        System.out.println(result);
        String[] aa = {"a", "b", "c"};
        List<String> list=new ArrayList<>();
//        list.
//        Online.aa ="fas";
        list.add("a");
        list.add("b");
        list.add("c");
        System.out.println(list);
        System.out.println(Arrays.toString(aa));
        System.out.println();
//        Java里面就两个数据类型：基本数据类型，引用数据类型
        Date date=new Date();
        String dateString="https://www.baidu.com/s?wd=aaa&rsv_spt=1";
//        dateString.split("?")[1].split("&")[0].split("=")[1];
//        dateString=date.getYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");

    }

    @Test
    public void findAll() {
        OnlineService onlineService = new OnlineServiceImpl();
//        List<OnlineModel> result = onlineService.findAll(null);
//       String aa= String.valueOf(result);
    }
}
